// src/fields/FieldGroup.tsx
import { useContext, useRef } from "react";

// src/fields/FieldContext.ts
import React from "react";
var ModuleFieldsArrayContext = React.createContext([]);
var ModuleFieldsActionsContext = React.createContext({});
var ModuleFieldPathContext = React.createContext([]);

// src/fields/FieldGroup.tsx
import { jsx } from "react/jsx-runtime";
var FieldGroup = ({
  children,
  name,
  label,
  expanded,
  helpText,
  inlineHelpText,
  internal,
  locked,
  tab,
  visibility,
  visibilityRules,
  advancedVisibility,
  useLargeLabel,
  display,
  icon,
  default: defaultValue
}) => {
  const currentFieldPath = useContext(ModuleFieldPathContext);
  const moduleFieldActions = useContext(ModuleFieldsActionsContext);
  const { addField } = moduleFieldActions;
  const childrenArrayRef = useRef([]);
  if (expanded === void 0) {
    const isNestedGroup = currentFieldPath.length > 0;
    expanded = !isNestedGroup;
  }
  const groupField = {
    type: "group",
    name,
    label,
    expanded,
    internal,
    locked,
    tab,
    help_text: helpText,
    inline_help_text: inlineHelpText,
    visibility,
    visibility_rules: visibilityRules,
    advanced_visibility: advancedVisibility,
    children: childrenArrayRef.current,
    default: defaultValue,
    use_large_label: useLargeLabel,
    display,
    icon
  };
  addField(groupField);
  return /* @__PURE__ */ jsx(ModuleFieldPathContext.Provider, { value: [...currentFieldPath, name], children: /* @__PURE__ */ jsx(
    ModuleFieldsActionsContext.Provider,
    {
      value: {
        ...moduleFieldActions,
        addField: (newField) => childrenArrayRef.current.push(newField)
      },
      children
    }
  ) });
};
var FieldGroup_default = FieldGroup;

// src/fields/RepeatedFieldGroup.tsx
import { useContext as useContext2, useRef as useRef2 } from "react";
import { jsx as jsx2 } from "react/jsx-runtime";
var RepeatedFieldGroup = ({
  children,
  name,
  label,
  expanded,
  helpText,
  inlineHelpText,
  internal,
  locked,
  occurrence,
  visibility,
  visibilityRules,
  advancedVisibility,
  groupOccurrenceMeta,
  icon,
  default: defaultValue
}) => {
  const currentFieldPath = useContext2(ModuleFieldPathContext);
  const moduleFieldActions = useContext2(ModuleFieldsActionsContext);
  const { addField } = moduleFieldActions;
  const childrenArrayRef = useRef2([]);
  if (expanded === void 0) {
    const isNestedGroup = currentFieldPath.length > 0;
    expanded = !isNestedGroup;
  }
  const groupField = {
    type: "group",
    name,
    label,
    expanded,
    children: childrenArrayRef.current,
    help_text: helpText,
    inline_help_text: inlineHelpText,
    internal,
    locked,
    occurrence: occurrence || { min: 0 },
    // Users without Typescript should have a fallback
    visibility,
    visibility_rules: visibilityRules,
    advanced_visibility: advancedVisibility,
    group_occurrence_meta: groupOccurrenceMeta,
    icon,
    default: defaultValue
  };
  addField(groupField);
  return /* @__PURE__ */ jsx2(ModuleFieldPathContext.Provider, { value: [...currentFieldPath, name], children: /* @__PURE__ */ jsx2(
    ModuleFieldsActionsContext.Provider,
    {
      value: {
        ...moduleFieldActions,
        addField: (newField) => childrenArrayRef.current.push(newField)
      },
      children
    }
  ) });
};
var RepeatedFieldGroup_default = RepeatedFieldGroup;

// src/fields/ModuleFields.tsx
import { useRef as useRef3, Fragment } from "react";
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
var CallFieldsDefinitionCallback = ({ callback, fieldsArrayRef }) => {
  if (callback) {
    callback(fieldsArrayRef.current);
  }
  return null;
};
var ModuleFields = ({
  children,
  outputCallback
}) => {
  const fieldsArrayRef = useRef3([]);
  const moduleFieldActions = {
    addField: (newField) => {
      fieldsArrayRef.current.push(newField);
    }
  };
  return /* @__PURE__ */ jsxs(Fragment, { children: [
    /* @__PURE__ */ jsx3(ModuleFieldPathContext.Provider, { value: [], children: /* @__PURE__ */ jsx3(ModuleFieldsActionsContext.Provider, { value: moduleFieldActions, children }) }),
    /* @__PURE__ */ jsx3(
      CallFieldsDefinitionCallback,
      {
        callback: outputCallback,
        fieldsArrayRef
      }
    )
  ] });
};
var ModuleFields_default = ModuleFields;

// src/fields/helpers.ts
var CHOICE_FIELD_TYPE = "choice";
var EMAIL_FIELD_TYPE = "email";
var SIMPLE_MENU_FIELD_TYPE = "simple_menu";
var valueIsArray = (field) => field.type === EMAIL_FIELD_TYPE || field.type === SIMPLE_MENU_FIELD_TYPE || field.type === CHOICE_FIELD_TYPE && field.multiple;
var getDefaultScalarValue = (field) => {
  if (Array.isArray(field.default)) {
    const firstValue = field.default[0];
    if (valueIsArray(field)) {
      return Array.isArray(firstValue) ? firstValue : field.default;
    }
    return firstValue;
  }
  return field.default;
};
var getDefaultValue = (field) => {
  if (field.type === "group") {
    if (field.occurrence) {
      const count = field.occurrence.default || field.occurrence.min;
      if (!field.default || !Array.isArray(field.default)) {
        return new Array(count).fill(void 0);
      }
      return field.default.slice(0, count);
    }
    const result = {};
    for (const childField of field.children) {
      if (childField.type !== "group" && childField.default) {
        result[childField.name] = getDefaultValue(childField);
      }
    }
    return result;
  } else if (field.occurrence) {
    const scalarValue = getDefaultScalarValue(field);
    const count = field.occurrence.default || field.occurrence.min;
    return new Array(count).fill(scalarValue);
  } else {
    return field.default;
  }
};

// src/fields/traverseFieldsJSON.ts
var traverseFieldsJSONHelper = (fields, values, handle, path) => {
  if (!fields) {
    return;
  }
  for (const field of fields) {
    let value = values ? values[field.name] : void 0;
    if (value === void 0) {
      value = getDefaultValue(field);
    }
    if (field.occurrence) {
      if (value.length) {
        value.forEach((v, i) => {
          handle([...path, field.name, i], v, field);
        });
      } else {
        handle([...path, field.name], value, field);
      }
    } else if (field.type === "group") {
      traverseFieldsJSONHelper(field.children, value, handle, [
        ...path,
        field.name
      ]);
    } else {
      handle([...path, field.name], value, field);
    }
  }
};
var traverseFieldsJSON = (fields, values, handle) => {
  return traverseFieldsJSONHelper(fields, values, handle, []);
};
var traverseFieldsJSON_default = traverseFieldsJSON;

// src/fields/Fields.tsx
import { useContext as useContext3 } from "react";

// src/fields/fieldTypeDefaults.ts
var AlignmentFieldDefaults = {
  horizontal_align: "CENTER",
  vertical_align: "TOP"
};
var AudioFieldDefaults = {
  file_id: null
};
var BackgroundImageFieldDefaults = {
  src: "",
  background_position: "MIDDLE_CENTER",
  background_size: "COVER"
};
var BlogFieldDefaults = null;
var BooleanFieldDefaults = false;
var BorderFieldDefaults = {};
var ChoiceFieldDefaults = null;
var ColorFieldDefaults = {
  color: null,
  css: null,
  hex: null,
  opacity: null,
  rgb: null,
  rgba: null
};
var CRMObjectFieldDefaults = {};
var CRMObjectPropertyFieldDefaults = {};
var CTAFieldDefaults = null;
var DateFieldDefaults = null;
var DateTimeFieldDefaults = null;
var EmailFieldDefaults = null;
var EmbedFieldDefaults = {
  source_type: "oembed"
};
var FileFieldDefaults = null;
var FollowUpEmailFieldDefaults = null;
var FontFieldDefaults = {
  font: null,
  font_set: "DEFAULT",
  size: null,
  size_unit: "px",
  color: null,
  styles: null,
  variant: null,
  fallback: null
};
var FormFieldDefaults = {
  response_type: "inline",
  message: "Thanks for submitting the form."
};
var GradientFieldDefaults = {};
var HtmlFieldDefaults = null;
var HubdbRowFieldDefaults = null;
var HubdbTableFieldDefaults = null;
var HublFieldDefaults = null;
var IconFieldDefaults = {};
var ImageFieldDefaults = {
  src: "",
  alt: null,
  size_type: null,
  loading: "disabled",
  width: null,
  height: null
};
var LinkFieldDefaults = {
  url: {
    type: "EXTERNAL",
    content_id: null,
    href: ""
  },
  open_in_new_tab: false,
  no_follow: false,
  sponsored: false,
  user_generated_content: false,
  rel: ""
};
var LogoFieldDefaults = {
  override_inherited_src: false,
  src: "",
  alt: null,
  width: null,
  height: null,
  loading: "disabled",
  suppress_company_name: false
};
var MeetingFieldDefaults = null;
var MenuFieldDefaults = null;
var NumberFieldDefaults = null;
var PageFieldDefaults = null;
var PaymentFieldDefaults = {};
var PodcastFieldDefaults = {};
var RichTextFieldDefaults = null;
var SfdcCampaignFieldDefaults = null;
var SimpleMenuCampaignFieldDefaults = [];
var SpacingFieldDefaults = {};
var SurveyFieldDefaults = {
  survey_type: "CES"
};
var TagFieldDefaults = null;
var TextFieldDefaults = null;
var TextAlignmentFieldDefaults = {};
var UrlFieldDefaults = {
  type: "EXTERNAL",
  content_id: null,
  href: ""
};
var VideoFieldDefaults = {
  player_id: null
};
var VariantSelectionFieldDefaults = {};
var WorkflowFieldDefaults = null;

// src/fields/Fields.tsx
import { jsx as jsx4 } from "react/jsx-runtime";
var basePropsCamelToSnakeCase = (baseProps) => {
  const {
    advancedVisibility,
    disabledControls,
    cssVariable,
    cssVariableState,
    displayWidth,
    helpText,
    id,
    inheritedValueDefaultValuePath,
    inheritedValuePropertyValuePaths,
    inlineEditable,
    inlineHelpText,
    label,
    links,
    internal,
    locked,
    name,
    occurrence,
    propertyAliasesPaths,
    required,
    sortable,
    visibility,
    visibilityRules
  } = baseProps;
  return {
    advanced_visibility: advancedVisibility,
    disabled_controls: disabledControls,
    css_variable: cssVariable,
    css_variable_state: cssVariableState,
    display_width: displayWidth,
    help_text: helpText,
    id,
    inherited_value_default_value_path: inheritedValueDefaultValuePath,
    inherited_value_property_value_paths: inheritedValuePropertyValuePaths,
    inline_editable: inlineEditable,
    inline_help_text: inlineHelpText,
    label,
    links,
    internal,
    locked,
    name,
    occurrence,
    property_aliases_paths: propertyAliasesPaths,
    required,
    sortable,
    visibility_rules: visibilityRules,
    visibility
  };
};
function BaseField(fieldProps) {
  const {
    inherited_value_default_value_path,
    inherited_value_property_value_paths,
    property_aliases_paths,
    ...restPassThroughProps
  } = fieldProps;
  const { addField } = useContext3(ModuleFieldsActionsContext);
  const inherited_value = inherited_value_default_value_path || inherited_value_property_value_paths ? {
    default_value_path: inherited_value_default_value_path,
    property_value_paths: inherited_value_property_value_paths
  } : void 0;
  const aliases_mapping = property_aliases_paths ? {
    property_aliases_paths
  } : void 0;
  addField({
    ...restPassThroughProps,
    ...inherited_value !== void 0 ? { inherited_value } : {},
    ...aliases_mapping !== void 0 ? { aliases_mapping } : {}
  });
  return null;
}
var AlignmentField = ({
  alignmentDirection,
  default: defaultValue = AlignmentFieldDefaults,
  ...passthroughProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "alignment",
      alignment_direction: alignmentDirection,
      default: defaultValue,
      ...basePropsCamelToSnakeCase(passthroughProps)
    }
  );
};
var AudioField = ({
  default: defaultValue = AudioFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "audioplayer",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var BackgroundImageField = ({
  default: defaultValue = BackgroundImageFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "backgroundimage",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var BlogField = ({
  default: defaultValue = BlogFieldDefaults,
  placeholder,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "blog",
      default: defaultValue,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var BooleanField = ({
  display,
  default: defaultValue = BooleanFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "boolean",
      default: defaultValue,
      display,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var BorderField = ({
  allowCustomBorderSides,
  default: defaultValue = BorderFieldDefaults,
  binding,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "border",
      default: defaultValue,
      allow_custom_border_sides: allowCustomBorderSides,
      binding,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var ChoiceField = ({
  choices,
  multiple,
  reorderingEnabled,
  display,
  placeholder,
  preset,
  default: defaultValue = ChoiceFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "choice",
      default: defaultValue,
      choices,
      multiple,
      reordering_enabled: reorderingEnabled,
      display,
      preset,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var ColorField = ({
  alternateNames,
  limitedOptions,
  default: defaultValue = ColorFieldDefaults,
  showOpacity,
  renderShades,
  collection,
  binding,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "color",
      alternate_names: alternateNames,
      default: defaultValue,
      show_opacity: showOpacity,
      limited_options: limitedOptions,
      render_shades: renderShades,
      collection,
      binding,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var CrmObjectField = ({
  objectType,
  propertiesToFetch,
  displayFormat,
  displayProperties,
  placeholder,
  default: defaultValue = CRMObjectFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "crmobject",
      default: defaultValue,
      object_type: objectType,
      properties_to_fetch: propertiesToFetch,
      display_format: displayFormat,
      display_properties: displayProperties,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var CrmObjectPropertyField = ({
  objectType,
  placeholder,
  default: defaultValue = CRMObjectPropertyFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "crmobjectproperty",
      default: defaultValue,
      object_type: objectType,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var CtaField = ({
  default: defaultValue = CTAFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "cta",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var DateField = ({
  default: defaultValue = DateFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "date",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var DateTimeField = ({
  step,
  default: defaultValue = DateTimeFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "datetime",
      default: defaultValue,
      step,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var EmailField = ({
  allowCustomEmailAddresses,
  default: defaultValue = EmailFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "email",
      default: defaultValue,
      allow_custom_email_addresses: allowCustomEmailAddresses,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var EmbedField = ({
  supportedSourceTypes,
  supportedOembedTypes,
  supportedMediaBridgeProviders,
  resizable,
  showPreview,
  default: defaultValue = EmbedFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "embed",
      default: defaultValue,
      supported_source_types: supportedSourceTypes,
      supported_oembed_types: supportedOembedTypes,
      supported_media_bridge_providers: supportedMediaBridgeProviders,
      resizable,
      show_preview: showPreview,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var FileField = ({
  picker,
  default: defaultValue = FileFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "file",
      default: defaultValue,
      picker,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var FollowUpEmailField = ({
  placeholder,
  default: defaultValue = FollowUpEmailFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "followupemail",
      default: defaultValue,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var FontField = ({
  loadExternalFonts,
  alternateNames,
  limitedOptions,
  showAdvancedOptions,
  binding,
  minSize,
  maxSize,
  default: defaultValue = FontFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "font",
      default: defaultValue,
      load_external_fonts: loadExternalFonts,
      alternate_names: alternateNames,
      limited_options: limitedOptions,
      show_advanced_options: showAdvancedOptions,
      binding,
      min_size: minSize,
      max_size: maxSize,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var FormField = ({
  allowInlineFormEditing,
  disableInlineFormEditing,
  embedVersions,
  supportAllWebinarTypes,
  default: defaultValue = FormFieldDefaults,
  ...baseProps
}) => {
  if (allowInlineFormEditing !== void 0) {
    throw new Error(
      "The allowInlineFormEditing prop is deprecated, please use disableInlineFormEditing instead."
    );
  }
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "form",
      default: defaultValue,
      allow_inline_form_editing: allowInlineFormEditing,
      disable_inline_form_editing: disableInlineFormEditing,
      embed_versions: embedVersions,
      support_all_webinar_types: supportAllWebinarTypes,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var GradientField = ({
  default: defaultValue = GradientFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "gradient",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var HtmlField = ({
  default: defaultValue = HtmlFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "html",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var HubDbRowField = ({
  tableNameOrId,
  columnsToFetch,
  displayFormat,
  displayColumns,
  placeholder,
  default: defaultValue = HubdbRowFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "hubdbrow",
      default: defaultValue,
      table_name_or_id: tableNameOrId,
      columns_to_fetch: columnsToFetch,
      display_format: displayFormat,
      display_columns: displayColumns,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var HubDbTableField = ({
  placeholder,
  default: defaultValue = HubdbTableFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "hubdbtable",
      default: defaultValue,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var HublField = ({
  default: defaultValue = HublFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "hubl",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var IconField = ({
  iconSet,
  default: defaultValue = IconFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "icon",
      default: defaultValue,
      icon_set: iconSet,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var ImageField = ({
  resizable,
  responsive,
  showLoading,
  default: defaultValue = ImageFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "image",
      default: defaultValue,
      resizable,
      responsive,
      show_loading: showLoading,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var LinkField = ({
  placeholder,
  showAdvancedRelOptions,
  supportedTypes,
  default: defaultValue = LinkFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "link",
      default: defaultValue,
      placeholder,
      show_advanced_rel_options: showAdvancedRelOptions,
      supported_types: supportedTypes,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var LogoField = ({
  showLoading,
  default: defaultValue = LogoFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "logo",
      default: defaultValue,
      show_loading: showLoading,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var MeetingField = ({
  placeholder,
  embeddable,
  default: defaultValue = MeetingFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "meeting",
      default: defaultValue,
      placeholder,
      embeddable,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var MenuField = ({
  placeholder,
  default: defaultValue = MenuFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "menu",
      default: defaultValue,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var NumberField = ({
  prefix,
  suffix,
  min,
  max,
  step,
  display,
  format,
  placeholder,
  default: defaultValue = NumberFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "number",
      default: defaultValue,
      prefix,
      suffix,
      min,
      max,
      step,
      display,
      format,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var PageField = ({
  placeholder,
  default: defaultValue = PageFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "page",
      default: defaultValue,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var PaymentField = ({
  default: defaultValue = PaymentFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "payment",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var PodcastField = ({
  entityType,
  default: defaultValue = PodcastFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "podcast",
      default: defaultValue,
      entity_type: entityType,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var RichTextField = ({
  enabledFeatures,
  default: defaultValue = RichTextFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "richtext",
      default: defaultValue,
      enabled_features: enabledFeatures,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var SalesforceCamapaignField = ({
  default: defaultValue = SfdcCampaignFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "salesforcecampaign",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var SimpleMenuField = ({
  default: defaultValue = SimpleMenuCampaignFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "simplemenu",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var SpacingField = ({
  limits,
  default: defaultValue = SpacingFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "spacing",
      default: defaultValue,
      limits,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var SurveyField = ({
  placeholder,
  default: defaultValue = SurveyFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "survey",
      default: defaultValue,
      placeholder,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var TagField = ({
  tagValue,
  default: defaultValue = TagFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "tag",
      default: defaultValue,
      tag_value: tagValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var TextField = ({
  validationRegex,
  validationErrorMessage,
  allowNewLine,
  showEmojiPicker,
  default: defaultValue = TextFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "text",
      default: defaultValue,
      validation_regex: validationRegex,
      validation_error_message: validationErrorMessage,
      allow_new_line: allowNewLine,
      show_emoji_picker: showEmojiPicker,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var TextAlignmentField = ({
  default: defaultValue = TextAlignmentFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "textalignment",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var UrlField = ({
  supportedTypes,
  default: defaultValue = UrlFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "url",
      default: defaultValue,
      supported_types: supportedTypes,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var VideoField = ({
  resizable,
  showAdvancedOptions,
  showPreview,
  default: defaultValue = VideoFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "videoplayer",
      default: defaultValue,
      resizable,
      show_advanced_options: showAdvancedOptions,
      show_preview: showPreview,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var VariantManagementField = ({
  variantDefinitionName,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "variantmanagement",
      variant_definition_name: variantDefinitionName,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var VariantSelectionField = ({
  variantDefinitionName,
  default: defaultValue = VariantSelectionFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "variantselection",
      variant_definition_name: variantDefinitionName,
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
var WorkflowField = ({
  default: defaultValue = WorkflowFieldDefaults,
  ...baseProps
}) => {
  return /* @__PURE__ */ jsx4(
    BaseField,
    {
      type: "workflow",
      default: defaultValue,
      ...basePropsCamelToSnakeCase(baseProps)
    }
  );
};
export {
  AlignmentField,
  AlignmentFieldDefaults,
  AudioField,
  AudioFieldDefaults,
  BackgroundImageField,
  BackgroundImageFieldDefaults,
  BlogField,
  BlogFieldDefaults,
  BooleanField,
  BooleanFieldDefaults,
  BorderField,
  BorderFieldDefaults,
  CRMObjectFieldDefaults,
  CRMObjectPropertyFieldDefaults,
  CTAFieldDefaults,
  ChoiceField,
  ChoiceFieldDefaults,
  ColorField,
  ColorFieldDefaults,
  CrmObjectField,
  CrmObjectPropertyField,
  CtaField,
  DateField,
  DateFieldDefaults,
  DateTimeField,
  DateTimeFieldDefaults,
  EmailField,
  EmailFieldDefaults,
  EmbedField,
  EmbedFieldDefaults,
  FieldGroup_default as FieldGroup,
  FileField,
  FileFieldDefaults,
  FollowUpEmailField,
  FollowUpEmailFieldDefaults,
  FontField,
  FontFieldDefaults,
  FormField,
  FormFieldDefaults,
  GradientField,
  GradientFieldDefaults,
  HtmlField,
  HtmlFieldDefaults,
  HubDbRowField,
  HubDbTableField,
  HubdbRowFieldDefaults,
  HubdbTableFieldDefaults,
  HublField,
  HublFieldDefaults,
  IconField,
  IconFieldDefaults,
  ImageField,
  ImageFieldDefaults,
  LinkField,
  LinkFieldDefaults,
  LogoField,
  LogoFieldDefaults,
  MeetingField,
  MeetingFieldDefaults,
  MenuField,
  MenuFieldDefaults,
  ModuleFields_default as ModuleFields,
  NumberField,
  NumberFieldDefaults,
  PageField,
  PageFieldDefaults,
  PaymentField,
  PaymentFieldDefaults,
  PodcastField,
  PodcastFieldDefaults,
  RepeatedFieldGroup_default as RepeatedFieldGroup,
  RichTextField,
  RichTextFieldDefaults,
  SalesforceCamapaignField,
  SfdcCampaignFieldDefaults,
  SimpleMenuCampaignFieldDefaults,
  SimpleMenuField,
  SpacingField,
  SpacingFieldDefaults,
  SurveyField,
  SurveyFieldDefaults,
  TagField,
  TagFieldDefaults,
  TextAlignmentField,
  TextAlignmentFieldDefaults,
  TextField,
  TextFieldDefaults,
  UrlField,
  UrlFieldDefaults,
  VariantManagementField,
  VariantSelectionField,
  VariantSelectionFieldDefaults,
  VideoField,
  VideoFieldDefaults,
  WorkflowField,
  WorkflowFieldDefaults,
  traverseFieldsJSON_default as traverseFieldsJSON
};
